<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserHealthTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_health', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id');
            $table->string('blood_pressure')->nullable()->comment('血压');
            $table->string('blood_sugar')->nullable()->comment('血糖');
            $table->string('uric_acid')->nullable()->comment('尿酸');
            $table->decimal('bmi')->nullable();
            $table->decimal('fat')->nullable()->comment('体脂率');
            $table->longText('med_history')->nullable()->comment('病史');
            $table->longText('past_med')->nullable()->comment('层用药');
            $table->longText('diagnosis')->nullable()->comment('诊断');
            $table->longText('summary')->nullable()->comment('评估总结');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_health');
    }
}
